package com.charger.PromoteOperations.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 
 * @TableName gift_ruleofgift
 */
@TableName(value ="gift_ruleofgift")
public class GiftRuleofgift implements Serializable {
    /**
     * 礼券规则中间表主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 礼券表主键
     */
    private Long giftId;

    /**
     * 礼券规则表主键
     */
    private Long ruleId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 礼券规则中间表主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 礼券规则中间表主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 礼券表主键
     */
    public Long getGiftId() {
        return giftId;
    }

    /**
     * 礼券表主键
     */
    public void setGiftId(Long giftId) {
        this.giftId = giftId;
    }

    /**
     * 礼券规则表主键
     */
    public Long getRuleId() {
        return ruleId;
    }

    /**
     * 礼券规则表主键
     */
    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GiftRuleofgift other = (GiftRuleofgift) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getGiftId() == null ? other.getGiftId() == null : this.getGiftId().equals(other.getGiftId()))
            && (this.getRuleId() == null ? other.getRuleId() == null : this.getRuleId().equals(other.getRuleId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getGiftId() == null) ? 0 : getGiftId().hashCode());
        result = prime * result + ((getRuleId() == null) ? 0 : getRuleId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", giftId=").append(giftId);
        sb.append(", ruleId=").append(ruleId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}